#ifndef VIDEOPLAYER_H
#define VIDEOPLAYER_H

#include <QWidget>
#include <vlc/vlc.h>

class VideoPlayer : public QWidget
{
    Q_OBJECT
public:
    explicit VideoPlayer(QString videoAddr = "rtmp://120.26.201.192/live/", QWidget *parent = nullptr);
    ~VideoPlayer();

    // VLC 播放相关
    libvlc_instance_t *vlcInstance;
    libvlc_media_player_t *mediaPlayer;
    QString addrHead;

    void setVideo(QString streamerCode);
    void mousePressEvent(QMouseEvent *event) override;

public slots:
    void play();// 开始播放
    void pause();// 暂停

signals:

};

#endif // VIDEOPLAYER_H
